//
//  MyPatientTableViewCell.m
//  LPTClient
//
//  Created by apple on 2018/12/7.
//  Copyright © 2018 zhaodd. All rights reserved.
//

#import "MyPatientTableViewCell.h"

@interface MyPatientTableViewCell ()

@property (nonatomic, weak) IBOutlet UIImageView *iconImageView;
@property (nonatomic, weak) IBOutlet UILabel *nameLab;
@property (nonatomic, weak) IBOutlet UILabel *timeLab;
@property (nonatomic, weak) IBOutlet UILabel *phoneLab;
@property (nonatomic, weak) IBOutlet UILabel *countLab;

@end

@implementation MyPatientTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)refreshModel:(MyPatientModel *)model
{
    NSString *url = IMG_URL(model.avatar.url);
    NSString *name = model.name;
    NSString *time = model.created_at;
    NSString *phone = model.mobile;
    NSString *count = [NSString stringWithFormat:@"%ld", model.visit_count];
    
    [self.iconImageView setImageWithURL:[NSURL URLWithString:url] placeholder:nil];
    self.nameLab.text = name;
    self.timeLab.text = time;
    self.phoneLab.text = phone;
    self.countLab.text = count;
}

@end
